<% content_for :header_tags do %>
  <%= stylesheet_link_tag 'demo_page', :plugin => 'redmine_statistics' %>
  <%= stylesheet_link_tag 'demo_table', :plugin => 'redmine_statistics' %>
  <%= javascript_include_tag 'jquery', :plugin => 'redmine_statistics' %>
  <%= javascript_include_tag 'jquery.dataTables.js', :plugin => 'redmine_statistics' %>
  <script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
      $('#example').dataTable();
    });
  </script>
<% end %>

<div id="dt_example">
  <div id="container_big">
    <div id="demo">
      <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
        <thead>
          <tr>
            <th>Name</th>
            <th>Priority Name</th>
            <th>Investigated Issues</th>
            <th>Resolved Issues</th>
            <th>Reopened Issues</th>
            <th>Regression Issues</th>
            <th>Date</th>
          </tr>
        </thead>
        <tbody>
        <% @personal_priority_issues.each do |personal_priority_issue| %>
          <tr class="gradeA">
            <td><%= personal_priority_issue.dev_name %></td>
            <td><%= personal_priority_issue.priority_name %></td>
            <td><%= personal_priority_issue.investigating_issues%> </td>
            <td><%= personal_priority_issue.resolved_issues %></td>
            <td><%= personal_priority_issue.reopened_issues %></td>
            <td><%= personal_priority_issue.regression_issues%> </td>
            <td><%= personal_priority_issue.created_on.to_s %></td>
          </tr>
        <% end %>
        </tbody>
        <tfoot>
          <tr>
            <td>合计</td>
            <td>--</td>
            <td><%= @investigated_issues %></td>
            <td><%= @resolved_issues %></td>
            <td><%= @reopened_issues %></td>
            <td><%= @regression_issues %></td>
            <td>--</td>
          </tr>
      </tfoot>
     </table>
    </div>
  </div>
</div>